3.26 \(\int \frac {1}{(1-\cos ^2(x))^2} \, dx\)

Optimal. Leaf size=13 \[ -\frac {1}{3} \cot ^3(x)-\cot (x) \]

[Out]

-cot(x)-1/3*cot(x)^3

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3175, 3767} \[ -\frac {1}{3} \cot ^3(x)-\cot (x) \]

Antiderivative was successfully verified.

[In]

Int[(1 - Cos[x]^2)^(-2),x]

[Out]

-Cot[x] - Cot[x]^3/3

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {1}{\left (1-\cos ^2(x)\right )^2} \, dx &=\int \csc ^4(x) \, dx\\ &=-\operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (x)\right )\\ &=-\cot (x)-\frac {\cot ^3(x)}{3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 17, normalized size = 1.31 \[ -\frac {2 \cot (x)}{3}-\frac {1}{3} \cot (x) \csc ^2(x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - Cos[x]^2)^(-2),x]

[Out]

(-2*Cot[x])/3 - (Cot[x]*Csc[x]^2)/3

________________________________________________________________________________________

fricas [B]  time = 1.00, size = 25, normalized size = 1.92 \[ -\frac {2 \, \cos \relax (x)^{3} - 3 \, \cos \relax (x)}{3 \, {\left (\cos \relax (x)^{2} - 1\right )} \sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)^2)^2,x, algorithm="fricas")

[Out]

-1/3*(2*cos(x)^3 - 3*cos(x))/((cos(x)^2 - 1)*sin(x))

________________________________________________________________________________________

giac [A]  time = 0.17, size = 14, normalized size = 1.08 \[ -\frac {3 \, \tan \relax (x)^{2} + 1}{3 \, \tan \relax (x)^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)^2)^2,x, algorithm="giac")

[Out]

-1/3*(3*tan(x)^2 + 1)/tan(x)^3

________________________________________________________________________________________

maple [A]  time = 0.07, size = 14, normalized size = 1.08 \[ -\frac {1}{3 \tan \relax (x )^{3}}-\frac {1}{\tan \relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1-cos(x)^2)^2,x)

[Out]

-1/3/tan(x)^3-1/tan(x)

________________________________________________________________________________________

maxima [A]  time = 0.87, size = 14, normalized size = 1.08 \[ -\frac {3 \, \tan \relax (x)^{2} + 1}{3 \, \tan \relax (x)^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)^2)^2,x, algorithm="maxima")

[Out]

-1/3*(3*tan(x)^2 + 1)/tan(x)^3

________________________________________________________________________________________

mupad [B]  time = 2.25, size = 10, normalized size = 0.77 \[ -\frac {\mathrm {cot}\relax (x)\,\left ({\mathrm {cot}\relax (x)}^2+3\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^2 - 1)^2,x)

[Out]

-(cot(x)*(cot(x)^2 + 3))/3

________________________________________________________________________________________

sympy [B]  time = 1.14, size = 34, normalized size = 2.62 \[ \frac {\tan ^{3}{\left (\frac {x}{2} \right )}}{24} + \frac {3 \tan {\left (\frac {x}{2} \right )}}{8} - \frac {3}{8 \tan {\left (\frac {x}{2} \right )}} - \frac {1}{24 \tan ^{3}{\left (\frac {x}{2} \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)**2)**2,x)

[Out]

tan(x/2)**3/24 + 3*tan(x/2)/8 - 3/(8*tan(x/2)) - 1/(24*tan(x/2)**3)

________________________________________________________________________________________